<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<div th:fragment="blog-sidebar" class="col-md-4 blog-sidebar">
    <br>
    <br>
    <br>
    <div class="am-panel-group">
        <form class="am-form" action="/search" method="post" id="searchForm" onkeydown="if(event.keyCode==13){return false;}">
            <div class="am-form-group am-form-icon am-form-feedback">
                <i class="am-icon-search" id="search"></i>
                <div id="searchDiv">
                    <input type="text"  placeholder="搜索文章" id="searchKey" name="searchKey">
                </div>
            </div>
        </form>
        <section class="am-panel am-panel-primary">
            <div class="am-panel-hd">最新文章</div>
            <ul class="am-list blog-list">
                <th:block th:each="title,iterStat:${titleBlogs}">
                    <li><a th:href="@{'/show/'+${title.id}}" th:text="${title.articleTitle}" target="_blank"></a></li>
                </th:block>
            </ul>
        </section>
        <section class="am-panel am-panel-primary">
            <div class="am-panel-hd">点击最多</div>
            <ul class="am-list blog-list">
                <th:block th:each="views,iterStat:${viewsBlogs}">
                    <li><a th:href="@{'/show/'+${views.id}}" th:text="${views.articleTitle}" target="_blank"></a></li>
                </th:block>
            </ul>
        </section>
        <div class="am-panel  am-panel-primary">
            <div class="am-panel-hd">
                分类
                <a style="float: right;color: black" href="/all_sort" target="_blank">more &raquo;</a>
            </div>
            <div class="am-panel-bd" id="sortPanel" style="word-wrap:break-word">
            </div>
        </div>
        <section class="am-panel am-panel-primary">
            <div class="am-panel-hd">
                归档
                <a style="float: right;color: black" href="/archive" target="_blank">more &raquo;</a>
            </div>
            <ul class="am-list blog-list" id="archiveUl">
            </ul>
        </section>
    </div>
</div>
</html>